/// Returns the type name of variable
///
/// # Example
///
/// ```rust
/// use meth_tools::prelude::type_of;
/// assert_eq!(
///     type_of(&vec![1,2,3]),
///     "alloc::vec::Vec<i32>",
/// )
/// ```
// #[allow(unused)]
pub fn type_of<T>(_: &T) -> &'static str {
    std::any::type_name::<T>()
}

/// Checks if *obj is the type of T
///
/// # Example
///
/// ```rust
/// use meth_tools::prelude::is_instance_of;
/// assert!(is_instance_of::<Vec<i32>>(&vec![1, 2, 3]));
/// ```
// #[allow(unused)]
pub fn is_instance_of<T: 'static>(obj: &impl std::any::Any) -> bool {
    obj.type_id() == std::any::TypeId::of::<T>()
}
